import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        // binaryTree.size(root);
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.preOrderNotRecursion(root);
        System.out.println();

        System.out.println("================");
        binaryTree.inOrder(root);
        System.out.println();
        binaryTree.inOrderNotRecursion(root);
        System.out.println();

        System.out.println("===============");
        binaryTree.postOrder(root);
        System.out.println();
        binaryTree.postOrderNotRecursion(root);
        System.out.println();
        List<Character> ret = new ArrayList<>();
        ret = binaryTree.postorderTraversal(root);

        //静态成员变量需要通过类名进行访问
        // System.out.println("二叉树的根的个数为:" + BinaryTree.nodeSize);

        // int number = binaryTree.size2(root);
        // System.out.println(number);

        // int leafNode = binaryTree.getLeafNodeCount(root);
        // binaryTree.getLeafNodeCount(root);
        // System.out.println("二叉树的叶子节点的个数为：" + BinaryTree.leafNode);

        // int leafNode = binaryTree.getLeafNodeCount2(root);
        // System.out.println(leafNode);

        // System.out.println(binaryTree.getKLevelNodeCount(root,2));

        // System.out.println(binaryTree.find(root,'D'));

        System.out.println(binaryTree.getHeight(root));

        // binaryTree.levelOrder(root);

        System.out.println(binaryTree.isCompleteTree(root));
        System.out.println(binaryTree.isCompleteTree2(root));
    }





}
